package com.lc.mapper;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liuc
 * @date 2021/5/5
 * @description 虚拟主机, 例如localhost, www.lc.com等
 **/
public class Host {

    private String hostName;
    private Map<String,Context> contextMap = new HashMap<>();

    public Host(String name){
        this.hostName = name;
    }

    public String getHostName() {
        return hostName;
    }

    public void setHostName(String hostName) {
        this.hostName = hostName;
    }

    public Map<String, Context> getContextMap() {
        return contextMap;
    }

    public void setContextMap(Map<String, Context> contextMap) {
        this.contextMap = contextMap;
    }

    public void addContext(Context context){
        this.contextMap.put(context.getName(),context);
    }
}
